package com.shixun.dds_11.mapper;

import com.github.pagehelper.Page;
import com.shixun.dds_11.dto.OrderPageQueryDTO;
import com.shixun.dds_11.entity.DdsOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author YSP
 * @since 2024-07-05
 */
public interface DdsOrderMapper extends BaseMapper<DdsOrder> {


    Page<DdsOrder> pageQuery(OrderPageQueryDTO orderPageQueryDTO);

    @Select("select * from dds_order where id = #{id}")
    DdsOrder select(Integer id);

    void update(DdsOrder order);

    @Select("select * from dds_order where user_id = #{userId} limit 1")
    DdsOrder getByUserId(Integer userId);

}
